import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import line from '@/components/line'
Vue.use(Router)
import myCenter from '@/components/myCenter'
import admin_index from '@/components/admin/index'
import admin_login from '@/components/admin/login'
//日志
import log from '@/components/admin/log'
//用户列表
import user_list from '@/components/admin/user_list'
//用户数据
import user_data from '@/components/admin/user_data'
//背景图片设置
import background from '@/components/admin/background'


export default new Router({
  routes: [
    {
      path: '/',
      component: index
    },
    {
      path: '/index',
      name: 'index',
      component: index
    },
    {
      path: '/search/:id',
      name: 'line',
      component: line
    },
    {
      path:'/mycenter/:userId',
      name:'mycenter',
      component:myCenter
    },
    //接下来是后端界面
    {
      path:'/admin/index',
      name:'admin',
      component:admin_index
    },{
      path:'/admin/login',
      name:'login',
      component:admin_login
    },{
      //日志
      path:'/admin/log/:mark',
      name:'log',
      component:log
    },{
      //用户列表
      path:'/admin/user_list',
      name:'user_list',
      component:user_list
    },{
      //用户数据
      path:'/admin/user_data/:type/:userId',
      name:'user_data',
      component:user_data
    },{
      //背景图片
      path:'/admin/back',
      name:'background',
      component:background
    },


  ]
})
